Tutorial 6: Creating Black Boxes - Part 1 

In this next tutorial, we'll discuss some of the power that is associated with Black Boxes in thinkingParticles. It is very important that you understand how to create Black Boxes as they make life much easier when you start to use them. Not only will they be reusable for many particle situations, but with them you can achieve better particle effects in a shorter span of time.

The obvious question is: what is a Black Box?

The simplest definition of a Black Box is that it is nothing more than a standard DynamicSet saved to your hard disk so it can be re-used.

More specifically, Black Boxes (at least good ones that you want to share with others or re-purpose) exist as collections of scene independent conditions and operators. These saved DynamicSets can then be used in other scenes without any further adjustments and become drag-and-drop in the same way you do with the other thinkingParticles operators. When you create your own Black Boxes you need to keep in mind that everything should be scene independent as it doesn't make sense to create Black Boxes that include Particle Group names or other scene-specific data.

So without further introduction, you are going to create your very own Black Box that mimics a standard 3ds Max Spray particle system.

image115.gif

When you play back this scene you’ll see that the particles get blown away. You won't change this effect - you'll simply use this scene as the starting point for your Black Box creation.

As you can see, the Wind space warp is bound to the thinkingParticles node.

  1. Go down in the modifier stack and highlight Thinking.

  2. Click onto the Properties button to open the thinkingParticles user interface.

To get a quick overview of the particle setup, select the Master DynamicSet from within the DynamicSet Tree View on the left-hand side. In the main wire setup dialog you'll see two DynamicSets (called create and Space Warp respectively).

image116.gif

The first thing you need to do to create your Black Box is to build a new DynamicSet.

  1. With the Master DynamicSet still selected, click Create to create a new DynamicSet entry.

  2. Rename the DynamicSet to Spray100.

You'll only need this DynamicSet temporarily. Once you build your Black Box, you will be able to delete it from the DynamicSet list.

 

Now, let’s start adding some conditions and operators.

  1. From the Conditions rollout, add an Always True Condition.

  2. Next, from the Operators / Generators section, add a Position Born operator to the Spray100 DynamicSet view.

  3. Finally, from the Helpers / Standard rollout, add a Point3 Helper.

 

image1_3.jpg

Operators added to Spray100 DynamicSet

Since this is being designed to be a Black Box, none of the operators or conditions will use any scene dependent data such as Group names or attached objects. This is essential for a Black Box to work properly under all possible circumstances. Now you'll connect up the various input and output data streams.

This connection is no longer needed, since thinkingParticles.5 all operators assume by default an "On" value on their activation input.



 

This tells the Position Born operator to continually birth particles.

The Vector Helper is responsible for piping in the positional data needed by the Position Born operator so that you can set where the particles are emitted from.

image2_.jpg

All operators connected

 

What this does is set the position of the Spray particle system to XYZ = 1, 1, 1 in World coordinates.

Now your Spray100 particle system is ready to be saved as a Black Box.

Every DynamicSet has its own main control bar at the very top of the Wire Setup View. The Save button within it stores the complete DynamicSet to the hard drive as a separate file. All DynamicSets are stored in a special directory (normally your C:\Documents and Settings\All Users\Documents\cebas\3dsmax9toX\thinkingParticles_3\BlackBox folder), and once saved, it will immediately show up as a Black Box in the Black Box menu.

 

A standard Windows file dialog shows up.

image117.gif


Be aware that all Black Boxes you save must be stored in the special C:\Documents and Settings\All Users\Documents\cebas\3dsmax9toX
\thinkingParticles_3\BlackBox folder in order to show up in the thinkingParticles dialog. Also, by default, the Black Box save dialog will use the name of the DynamicSet as the default name for the new Black Box, so make sure you use a relevant name, or that you type in a recognizable name when the save dialog comes up.


 

 

 

 

 

You now have a Black Box ready for use. Let's check it out.

Don't panic about the reset - you've saved the simple Spray particle system you want to re-use.

  1. In the new scene, create a new thinkingParticles icon and open up the dialog.

  2. Next, in the Particle Group Tree View, create a new particle group. Leave the name unchanged.

  3. Finally, create a new DynamicSet in the DynamicSet Tree View and call it BB_Spray

Now comes the fun part - adding in your saved Black Box.

image118.gif

You now see a new entry named Spray100 - the Black Box you just created!

When you do, something interesting happens; you get two Wire Setup View window stacked on top of one another.

image3_2.jpg

The Black Box from within the Wire Setup View

In the image above, you can see that the upper BB_Spray DynamicSet now contains a single operator: the Black Box Spray100. You can tell because the Spray100 operator is prefixed by a D: in the name (which stands for DynamicSet), and it also offers no direct input or output data streams.

Beneath it are the contents of the Spray100 Black Box. The hierarchy of this configuration in the DynamicSet Tree View shows that the Spray100 DynamicSet is actually now a Sub-DynamicSet of the BB_Spray DynamicSet.

image119.gif

Whenever you choose the BB_Spray DynamicSet, you will always be shown the Spray100 Black Box contents as well.

The animation you originally created is now here in this fresh scene. What makes this special is that all of the original Spray100 Black Box operators are available for further editing, so that you can continue to customize or refine the Black Box effect as it relates to your current project. Since the Position Born operator's rollouts are accessible through the BB_Spray DynamicSet, you can send the particles it creates into any group that is specific to your current scene.

As you can see, Black Boxes are a very powerful option for keeping things organized. Having the ability to save and re-use scene independent DynamicSets is a major key to doing advanced particle system effects with thinkingParticles as well as reducing the amount of time it takes to set up these effects.